package com.study;

import com.study.service.ioc.TestService4;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
//import org.springframework.web.context.support.XmlWebApplicationContext;

public class MyTestApplication {


	public static void main(String[] args) {

		ApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);
//		ApplicationContext classPath = new ClassPathXmlApplicationContext();
//		ApplicationContext web = new XmlWebApplicationContext();

		// 循环依赖测试
		TestService4 testService = (TestService4) context.getBean("testService4");
		testService.test();






//		new Thread().join();
//		ThreadPoolExecutor executor = new ThreadPoolExecutor(1,5 ,1000, TimeUnit.SECONDS,new LinkedBlockingDeque<>(1000));
//		executor.execute(()->System.out.println("aaaaa"));
//		Future future = executor.submit(()->System.out.println("aaaaa"));

	}
}
